﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Ajax.aspx.cs" Inherits="Ajax" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="DemoTitleContentPlaceHolder" Runat="Server">
Ajax
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="DemoContentPlaceHolder" Runat="Server">

<asp:Panel runat="server" ID="Panel1">
    Content here
    <div id="server-response"></div>
</asp:Panel>

<asp:Label runat="server" Text="Click Label" ID="ClickLabel"></asp:Label>

<cc2:AjaxExtender ID="AjaxExtender1" runat="server" 
TriggerSelector="#{ClickLabel}" 
Callback="function(data, status){jQuery('#server-response').text(data);}" 
MethodName="ServerMethod" 
/>

</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="SourceContentPlaceHolder" Runat="Server">
<pre>
&lt;asp:Panel runat="server" ID="Panel1"&gt;
    Content here
    &lt;div id="server-response"&gt;&lt;/div&gt;
&lt;/asp:Panel&gt;

&lt;asp:Label runat="server" Text="Click Label" ID="ClickLabel"&gt;&lt;/asp:Label&gt;

&lt;cc2:AjaxExtender ID="AjaxExtender1" runat="server" 
TriggerSelector="#{ClickLabel}" 
Callback="function(data, status){jQuery('#server-response').text(data);}" 
MethodName="ServerMethod" 
/&gt;

</pre>
</asp:Content>

